package edu.sctu.zcy.month201505.subwaysystem.V2;

/**
 * Created by wswk on 2015/6/1.
 */
public class CheckTheXingLiOfPassenger {

    public String is_Safe = "易燃易爆，管制刀具，有毒气质";
    boolean isWater;
    boolean isPackage;

    public boolean isPackage(Passenger passenger) {


            if (passenger.isIs_Package()) {
                if (is_Safe.contains(passenger.getPackageName())) {

                    isPackage = true;

                } else {

                    isPackage = false;
                }
            } else {

                isPackage = false;
            }


        return isPackage;
    }

    public boolean isWater(Passenger passenger) {

        if (passenger.isIs_Water()) {
                if (is_Safe.contains(passenger.getWaterName())) {

                    isWater = true;

                } else {

                    isWater = false;
                }
            } else {

                isWater = false;
            }


    return isWater;
    }
}
